package com.whenjun.task;

import com.whenjun.common.LoggerParent;
import com.whenjun.service.impl.IscPersonServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@EnableScheduling
public class TaskPerson extends LoggerParent {

    @Autowired
    private IscPersonServiceImpl iscPersonService;

    // 每 5 分钟执行一次
    @Scheduled(cron = "0 0/5 * * * ? ")
    public void syncPerson(){
        iscPersonService.synPerson();
    }
}
